import { configureStore } from '@reduxjs/toolkit'
import userReducer from './slices/userSlice'
import appReducer from './slices/appSlice'
import adminReducer from './slices/adminSlice'
import roleReducer from './slices/roleSlice'
import permissionReducer from './slices/permissionSlice'
import dashboardReducer from './slices/dashboardSlice'
import auditReducer from './slices/auditSlice'
import appUserReducer from './slices/appUserSlice'
import bookReducer from './slices/bookSlice'
import categoryReducer from './slices/categorySlice'

export const store = configureStore({
  reducer: {
    user: userReducer,
    app: appReducer,
    admin: adminReducer,
    role: roleReducer,
    permission: permissionReducer,
    dashboard: dashboardReducer,
    audit: auditReducer,
    appUser: appUserReducer,
    book: bookReducer,
    category: categoryReducer,
  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: false,
    }),
})

export default store
